
//
//  ATCircleImageView.m
//  Postre
//
//  Created by CoderLT on 2017/6/4.
//  Copyright © 2017年 CoderLT. All rights reserved.
//

#import "ATCircleImageView.h"

@implementation ATCircleImageView

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        [self setup];
    }
    return self;
}
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}
- (void)setup {
    self.clipsToBounds = YES;
    self.contentMode = UIViewContentModeScaleAspectFill;
    self.layer.cornerRadius = self.height/2;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.layer.cornerRadius = self.height/2;
}
@end
